package main

import "fmt"

func main() {
	i := 10
	ip := &i
	fmt.Printf("指针：%v\n", ip)
	fmt.Printf("指针：%p\n", ip)
	fmt.Printf("指针的地址：%p\n", &ip)
	modifyInt(ip)
	fmt.Println("int值被修改了，新值为:", i)
}

func modifyInt(ip *int) {
	fmt.Printf("指针：%v\n", ip)
	fmt.Printf("指针：%p\n", ip)
	fmt.Printf("指针的地址：%p\n", &ip)
	*ip = 1
}
